package com.dev.op.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dev.op.VO.SubmissionVO;
import com.dev.op.entity.JudgeData;
import com.dev.op.entity.JudgeResult;
import com.dev.op.entity.Submission;

import java.io.IOException;
import java.util.List;

/**
* @author Administrator
* @description 针对表【submission】的数据库操作Service
* @createDate 2025-03-23 11:23:32
*/
public interface SubmissionService extends IService<Submission> {
    Submission addSubmission(SubmissionVO submissionVO) throws Exception;
    List<Submission> runSampleTestCases(Submission submission) throws Exception;
    Page<Submission> getSubmissionsByUserIdAndProblemId(int userId, String problemId, int page, int size);
    Page<Submission> getSubmissionByUserId(int userId, int page, int size);
    Page<Submission> getSubmissionByProblemId(int problemId, int page, int size);
    void saveTask(SubmissionVO submissionVO) throws Exception;
    Submission getById(String id) throws Exception;
    void splitTaskAndPushToRedis(SubmissionVO submissionVO) throws Exception;
}
